-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(adminform): extract get collaborators #1762
Merged
seaerchin
merged 7 commits into
refactor/update-form-collab
from
refactor/extract-get-collaborators
May 5, 2021
Merged
refactor(adminform): extract get collaborators #1762
seaerchin
merged 7 commits into
refactor/update-form-collab
from
refactor/extract-get-collaborators
May 5, 2021
+375
−18
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seaerchin
changed the title
refactor(wip - adminform): extract get collaborators
refactor(adminform): extract get collaborators
Apr 29, 2021
seaerchin
requested review from
karrui and
mantariksh
and removed request for
karrui
April 29, 2021 10:01
mantariksh
reviewed
Apr 30, 2021
mantariksh
approved these changes
May 3, 2021
seaerchin
force-pushed
the
refactor/extract-get-collaborators
branch
from
May 5, 2021 06:17
6f22595
to
10f8491
Compare
seaerchin
added a commit
that referenced
this pull request
May 5, 2021
* feat(form/server/model): adds method to updateFormCollaborators * feat(form/types; admin-form/service): adds service method for updating collaborators; adds typings * feat(admin-forms/settings/routes): adds controller and handler for updating collaborators of a form * feat(public/service): adds method on AdminFormService to update collaborators * refactor(collaborator-modal.client.controller): replaces old call with new AdminFormService call * docs(admin-forms): fixed typos in handleUpdateCollaborators * test(tests): adds unit tests for form model, admin form service and admin form controller * refactor(admin-form/controller): changed unknown on joi vaildator to optional * refactor(types): adds _id to the type of Permission * refactor(admin-form/collaborators): updated dto to be just an array; error message extraction fixed * fix(collaborator-modal/client/controller): fixed fe callsites showing celebrate errors * fix(collaborator-modal/client/controller): fixed error caused by accidental auto import * refactor(admin-form/controller): changed to use .json and formCollaborators is properly selected * test(form/server/model/spec): changed test to use .rejects() * style(collaborator-modal/client/controller): updated error message * test(admin-forms): integration tests for updating of collaborators (#1753) * test(admin-forms/settings): integration tests for updating of collaborators * docs(admin-forms/settings/test): updated comment for test * test(admin-form/settings/routes/spec): updated tests for new shape * docs(admin-form/settings/routse/spec): updated http verb to PUT * refactor(adminform): extract get collaborators (#1762) * feat(admin-form/controller): added new route and controller for GET admin-form/collaborators * feat(admin-form/controller): adds new GET admin/form/collaborators endpoint * test(admin-form/controller): adds unit tests for new endpoint * test(admin-form/controller): fixed email domain in tests being from gov * chore(admin-form/collaborators): updated docs and changed from res.send to res.json * test(admin-forms/settings/routes): added integration tests for GET /collaborators (#1777) * chore(admin-forms/settings/routes/spec): removed double import
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, our
/adminform
endpoint is returning the full adminform object. This endpoint has alot of responsibilities and this pr shards out the responsibility of returning the collaborators to the individual endpoints.Closes #1497
Solution
This PR adds a new endpoint for
GET /admin/form/collaborators
, which is solely responsible for returning the slice of the form state that holds the collaborators